﻿<UserControl xmlns:Controls="clr-namespace:Flare.Controls" 
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:Converter="clr-namespace:Flare.Converter" 
      x:Class="Flare.Pages.Endpoint.Details" 
      xmlns:this="{Binding RelativeSource={RelativeSource Self}}"
      mc:Ignorable="d" d:DesignHeight="600" d:DesignWidth="1200">

    <DockPanel LastChildFill="False" VerticalAlignment="Top">
        <DockPanel LastChildFill="False" 
                   DockPanel.Dock="Left">
            <TextBlock FontSize="16" Foreground="{StaticResource ColorText}" Text="{Binding type, FallbackValue=network_type}" DockPanel.Dock="Top" Margin="10,0,0,0" />

            <StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Margin="10,0,0,0">
                <TextBlock Style="{StaticResource HeaderPageText}" Text="{Binding name, FallbackValue=network_name}" TextWrapping="Wrap" Margin="0,0,10,0"/>
                <TextBlock x:Name="ui_ping_status" Text="(не доступен)" Style="{StaticResource HeaderPageText}" Margin="10,0,10,0"/>
            </StackPanel>

            <DockPanel DockPanel.Dock="Top" LastChildFill="False" Margin="10,0,0,0">
                <Label Name="EditThis" Content="Редактировать" DockPanel.Dock="Left" Style="{StaticResource StyleUrl}" MouseLeftButtonUp="EditThis_MouseLeftButtonDown" />
                <Label Name="RemoveThis" Content="Удалить" DockPanel.Dock="Left" Style="{StaticResource StyleUrl}" MouseLeftButtonUp="RemoveThis_MouseLeftButtonDown" />
            </DockPanel>
            
            <Controls:FlameTblock Header="Отдел" Content="{Binding department, FallbackValue=network_department}" Margin="10,40,0,0" DockPanel.Dock="Top" />
            <Controls:FlameTblock Header="Кабинет" Content="{Binding room, FallbackValue=network_room}" DockPanel.Dock="Top" Margin="10,0,0,0"/>
            <Controls:FlameTblock x:Name="current_ip" Header="IP адрес" Content="{Binding ip, FallbackValue=network_ip}" DockPanel.Dock="Top" Margin="10,0,0,0"/>
            <Controls:FlameTblock Header="Телефон" Content="{Binding phone, FallbackValue=network_phone}" DockPanel.Dock="Top" Margin="10,0,0,0"/>

            <DockPanel LastChildFill="False" DataContext="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" Margin="10,40,0,0"  
                       DockPanel.Dock="Top">
                
                <Controls:TilesMenu x:Name="RemoteAdmin" Header="Управление" DockPanel.Dock="Left" Click="RemoteAdmin_Click" Margin="5"/>
                <Controls:TilesMenu x:Name="RemoteView" Header="Просмотр" DockPanel.Dock="Left" Click="RemoteView_Click" Margin="5"/>
                <Controls:TilesMenu x:Name="RemoteTransfer" Header="Передача файлов" DockPanel.Dock="Left" Click="RemoteTransfer_Click" Margin="5"/>
                <Controls:TilesMenu x:Name="PingSend" Header="Пинг" DockPanel.Dock="Left" Click="PingSend_Click" Margin="5"/>
            </DockPanel>
        </DockPanel>
        
        <TextBlock x:Name="log"  Margin="80,0,0,0" FontSize="14" FontFamily="Segoe UI" Foreground="{DynamicResource ColorText}" DockPanel.Dock="Top"/>
    </DockPanel>
</UserControl>
